<template>
  <CardModel :height="`${height}vh`" :plat_form="plat_form" />
</template>

<script lang="ts" setup>
import { onMounted, ref } from "vue"
import CardModel from "./components/cardModel.vue"

type PlatFormType = "Win" | "Mac"

const height = ref<string>("80")
const plat_form = ref<PlatFormType>("Win")
const platform = navigator?.platform

onMounted(() => {
  if (platform.includes("Win")) {
    // 当前是 Windows 系统
    height.value = "82"
    plat_form.value = "Win"
  } else if (platform.includes("Mac")) {
    // 当前是 macOS 系统
    height.value = "78"
    plat_form.value = "Mac"
  }
})
</script>
